<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<h:head>  
  		
    </h:head> 
	
<h:body>
<ui:composition template="/WEB-INF/templates/templateMain.xhtml">
	<ui:define name="content">
	    <p:fieldset legend="Cadastro de Médicos" toggleable="false">
	    
	    <h:form id="cadastroMedicos">
	    <h:panelGrid columns="2">
	    
	    <h:outputText value="Nome: " id="nome"></h:outputText>
	    <p:inputText value="#{medicoBean.medicoSelecionado.MEDICO_NOME}" size="80"></p:inputText>
	    
	    <h:outputText value="CRM: "></h:outputText>
	    <p:inputMask mask="99.999" id="crm" value="#{medicoBean.medicoSelecionado.MEDICO_CRM}" size="20"/>
	    
	    <h:outputText value="Especialidade: "></h:outputText>
	    <p:inputText value="#{medicoBean.medicoSelecionado.MEDICO_ESPECIALIDADE}" size="50"></p:inputText>
	    
	    <h:outputText value="Cidade: "></h:outputText>
	    <h:selectOneMenu value="#{medicoBean.medicoSelecionado.CIDADE}">
	    	<f:selectItems value="#{medicoBean.comboCidades}"></f:selectItems>
	    	<f:converter converterId="ConversorCidade"></f:converter>
	    </h:selectOneMenu>
	    
	    <h:outputText value="Bairro: "></h:outputText>
	    <p:inputText value="#{medicoBean.medicoSelecionado.MEDICO_BAIRRO}" size="50"></p:inputText>
	    
	    <h:outputText value="Endereço: "></h:outputText>
	    <p:inputText value="#{medicoBean.medicoSelecionado.MEDICO_ENDERECO}" size="50"></p:inputText>
	    
	    <h:outputText value="Email: "></h:outputText>
	    <p:inputText value="#{medicoBean.medicoSelecionado.MEDICO_EMAIL}" size="50"></p:inputText>
	    
	    <h:outputText value="Telefone: "></h:outputText>
	    <p:inputMask mask="(99)9999-9999" id="fone" value="#{medicoBean.medicoSelecionado.MEDICO_FONE}"/>
	    
	    <h:outputText value="Celular: "></h:outputText>
	    <p:inputMask mask="(99)9999-9999" id="celular" value="#{medicoBean.medicoSelecionado.MEDICO_CELULAR}"/>
	    
	    <h:outputText value="CEP: "></h:outputText>
	    <p:inputMask mask="99999-999" id="cep" value="#{medicoBean.medicoSelecionado.MEDICO_CEP}" />
	    
	    <h:outputText value="Observações: "/> 
		<p:inputTextarea id="obs" value="#{medicoBean.medicoSelecionado.MEDICO_OBS}" autoResize="on" cols="100" rows="5"/>
	    
	    </h:panelGrid>
	    <br></br>
	    <p:commandButton value="Gravar" action="#{medicoBean.botaoGravar}" ajax="false"/>
	    <p:commandButton value="Voltar Para listagem" action="#{medicoBean.voltarParaListagem}" immediate="true" ajax="false"/>
	    </h:form>		
		</p:fieldset>
	</ui:define>
</ui:composition>
</h:body>
</html>